const express = require('express')
const router = express.Router()
// 1. 导入验证数据的中间件
const expressJoi = require('@escook/express-joi')

// 导入注册接口
const user_query = require('../router-query/users')
// 2. 导入需要的验证规则对象
const { reg_login_schema } = require('../schema/index')

// 注册新用户
router.post('/user', expressJoi(reg_login_schema), user_query.user)

module.exports = router
